<?php include('conn.php');

//1. 链接数据库
header("content-type:text/html;charset=utf8");
include('conn.php');
$id=$_GET['id'];
//2.执行sql
$sql_select = "select * from user where id='$id'";
$stmt = mysqli_query($conn,$sql_select);
//    var_dump($stmt);
//    die();
$user = mysqli_fetch_assoc($stmt); // 解析数据

?>
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="./bootstrap-3.4.1-dist/css/bootstrap.css">
  <script src="./jquery-3.5.1.min.js"></script>
  <script src="./bootstrap-3.4.1-dist/js/bootstrap.js"></script>
</head>
<style>
 #msg{
    height: 2rem;
    text-align: center;
    position: fixed;
    top: 50%;
    margin-top: -1rem;
    line-height: 2rem;
    width: 100%;
}
#msg span{
    color: #fff;
    background: #f05f55;
    height: 2rem;
    display: inline-block;
    padding: 0 3rem;
    border-radius: 52px;
}
			.loading {
				width: 10%;
				height: 10%;
				position: fixed;
				top: 1000px;
				left:150px;
				
				z-index: 100;
			}
body {
	background-color: #F2F2F2;
}
.btn-primary {
  color: #fff;
  background-color: #337ab7;
  border-color: #2e6da4;
  margin-left: 156px;
}
input {
        border-radius: 20px;
    }
#send {
  width: 30px;
  outline: none;
  border: none;
  background: rgb(0, 132, 255);
  height: 30px;
  cursor: pointer;
  color: #fff;
  border-radius: 20px;
  font: bold 12px '宋体';
  transition: all 0.5s;
  margin-top: 30px;

}
#send1 {
  width: 30px;
  outline: none;
  border: none;
  background: rgb(0, 132, 255);
  height: 30px;
  cursor: pointer;
  color: #fff;
  border-radius: 20px;
  font: bold 12px '宋体';
  transition: all 0.5s;
  margin-top: 30px;

}
 #in2 {
 border: none;
background-color: #F2F2F2;
}
li{
list-style:none;
margin-left: 120px;
}
.well {
  min-height: 20px;
  padding: 19px;
  margin-bottom: 20px;
  background-color: #f5f5f5;
  border: 1px solid #e3e3e3;
  border-radius: 4px;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
  margin-left: -50px;
}

</style>
</head>
<?php
include ("menu.php");
?>
 <script>
        function alert(e){
            $("body").append("<div id='msg'><span>"+e+"</span></div>");
            clearmsg();
        }
        function clearmsg(){
            var t = setTimeout(function(){
                $("#msg").remove();
            },2000)
        };
        
       </script>
<div class="c"></div>
		
		
		<div class="footer" style="text-align:center; margin:20px">   
                <? if($_SESSION['img']==''){?>  
		<form action="upload_file.php" method="post"
			enctype="multipart/form-data">
			<label for="file">请上传你的头像:</label>
			<input type="file" name="file" id="file" style="margin-left: 45%;"/> 
			<br />
			<input type="submit" name="submit" value="确认" />
		</form>  
               <?}?>
		<br>
			<? if($_SESSION['img']==''){?>  
			<a href="https://jq.qq.com/?_wv=1027&k=qCPXle6A"><img src="img/logo.jpg" width="80" /></a> 
			<?}else{?>
			<a href="https://jq.qq.com/?_wv=1027&k=qCPXle6A"><img class="yuanxing" src="<?echo $_SESSION['img'];?>" width="80" style="border-radius: 50px; border: 1px solid #7492f6; width:100px;height:100px;margin: 5px 5px 5px 0;
    position: absolute;
    border-radius: 50px;


" /></a>  
			<?}?>
			<div style="line-height:32px;color:#000000;font-size:15px">@<? echo $_SESSION['nicheng']?></div>   
		<a class="xn">修改</a></div>
	
	</div>
	
</div>
 <button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
    资料
  </button>
  <div class="collapse" id="collapseExample">
    <div class="well">
     
        <li>
        <? if($_SESSION['qm']==''){?>  
		<form  method="post"enctype="multipart/form-data">
        <span id='k2'><input type="text" class="amount_text1" id="qm1"  
    name="qm" placeholder="请输入签名"> 
    <input type="submit"  id='send1'  name="submit" value="确认" />
    </span>
			
		</form>  
        <?}else{?>
		<br>
        <input name="qm" class="amount_text1" id="xq" placeholder="请输入更改的签名" type="text"value="<?php echo $_SESSION['qm'];?>"> 
                  <br>
                 <input name="username" class="amount_text1" id="xz"  placeholder="请输入更改的账号" type="text"value="<?php echo $_SESSION['username'];?>"> 
                 <input name="password" class="amount_text1" id="xm" placeholder="请输入更改的密码" type="text"value="<?php echo $_SESSION['password'];?>">
    <input name="nicheng" class="amount_text1" id="xn"
     placeholder="请输入更改的游戏名" type="text"
    value="<?php echo $_SESSION['nicheng'];?>"> 
                     <input type="submit" id='send' name="
    submit" value="保存">
                  </span>
			<?}?>  

</li>
  
</div>

</div>
  
 <script>
       $(document).ready(function () {
  $(".amount_range1").change(function () {
    console.log("test");
    var val =(".amount_range1").val();
    $(".amount_text1").val(val);
  });
  
  $(".amount_text1").keyup(function () {
    console.log("test");
    var val = $(".amount_text1").val();
    $(".amount_range1").val(val);
  });
});
$('#xz').slideUp(0)
$('.xz').click(function(){
  $('#xz').slideDown(2000);
})
$('#send').slideUp(0)
$('.xz').click(function(){
  $('#send').slideDown(2000);
})
$('#xm').slideUp(0)
$('.xm').click(function(){
  $('#xm').slideDown(2000);
})
$('#send').slideUp(0)
$('.xz').click(function(){
  $('#send').slideDown(2000);
})
$('#xq').slideUp(0)
$('.xq').click(function(){
  $('#xq').slideDown(2000);
})
$('#send').slideUp(0)
$('.xq').click(function(){
  $('#send').slideDown(2000);
})
$('#xn').slideUp(0)
$('.xn').click(function(){
  $('#xn').slideDown(2000);
})
$('#send').slideUp(0)
$('.xn').click(function(){
  $('#send').slideDown(2000);
})



        </script> 
 
</body>
</html>